#include "StdAfx.h"
#include "IcmpReply.h"

CIcmpReply::CIcmpReply()
{
	m_dwAddress = INADDR_NONE;
	m_dwTTL = 0;
	m_dwError = ERROR_SUCCESS;
}

CIcmpReply::CIcmpReply(const icmp_echo_reply* reply)
{
	memcpy(this, reply, sizeof(icmp_echo_reply)); 

	m_dwAddress = INADDR_NONE;
	m_dwTTL = 0;
	m_dwError = ERROR_SUCCESS;
}

CIcmpReply::CIcmpReply(CIcmpReply & oData)
{
	*this = oData;
}

CIcmpReply::operator icmp_echo_reply*()
{
	return (icmp_echo_reply*)this; 
}

CIcmpReply* CIcmpReply::operator=(CIcmpReply & oData)
{
	memcpy(this, (icmp_echo_reply*)&oData, sizeof(icmp_echo_reply)); 

	m_dwAddress = oData.m_dwAddress;
	m_dwTTL = oData.m_dwTTL;

	return this;
}
